﻿<Window x:Class="ResourceBlender_Express.WinApplications"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:loc="clr-namespace:ResourceBlender_Express"
    loc:WindowService.EscapeClosesWindow="True"
    Title="Applications" Height="300" Width="300" WindowStartupLocation="CenterOwner"
    Loaded="Window_Loaded"
    Style="{StaticResource {x:Type Window}}" Icon="/ResourceBlender-Express;component/images/resourceblender.ico">
    <Window.CommandBindings>
        <CommandBinding Command="ApplicationCommands.New" Executed="AddApplication" />
        <CommandBinding Command="loc:ResourceBlenderCommands.Edit" Executed="EditApplication" CanExecute="CanExecuteEditApplication" />
        <CommandBinding Command="loc:ResourceBlenderCommands.Delete" Executed="DeleteApplication" CanExecute="CanExecuteDeleteElement" />
    </Window.CommandBindings>
    <Grid Margin="6">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        
        <ListBox Name="lstApplications" HorizontalAlignment="Stretch" Grid.Row="0" VerticalContentAlignment="Top" ItemsSource="{Binding}" DisplayMemberPath="DisplayName" MouseDoubleClick="lstApplications_MouseDoubleClick">
        </ListBox>
        <Grid Grid.Row="1" Grid.Column="0" VerticalAlignment="Center">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <loc:ToolBarButton Grid.Column="0" Command="ApplicationCommands.New" Text="Add Application" Image="images/add_24.png" ToolTip="Add Application" AlwaysShowBorder="True" />
            <loc:ToolBarButton Grid.Column="2" Command="loc:ResourceBlenderCommands.Edit" Text="Edit" Image="images/edit_24.png" ToolTip="Edit Application" AlwaysShowBorder="True" />
            <loc:ToolBarButton Grid.Column="3" Command="loc:ResourceBlenderCommands.Delete" Text="Delete" Image="images/delete_24.png" ToolTip="Delete Application" AlwaysShowBorder="True" />
           
        </Grid>
        
        <StackPanel HorizontalAlignment="Right" Name="stkDialogButtons" IsItemsHost="False" Grid.Row="2" Grid.Column="0" VerticalAlignment="Center" Orientation="Horizontal">
            <Button Name="btnOk" Width="70" IsDefault="True" IsCancel="True">Ok</Button>
            <Button Name="btnCancel" Width="70" IsCancel="True">Cancel</Button>
        </StackPanel>
    </Grid>
</Window>
 